package unit2_1010.test6;

public class Pet {
	
	private String name;
	private int health;
	private String sex;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getHealth() {
		return health;
	}
	public void setHealth(int health) {
		if (health < 1 || health > 100) {
			System.out.println("健康值应在1-100之间，默认60");
			health = 60;
		}
		this.health = health;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Pet(String name, int health, String sex) {
		super();
		this.name = name;
		this.health = health;
		this.sex = sex;
	}
	public Pet() {
		super();
	}
	
	public void show() {
		/*
		 * [0,1)*6
		 * 0.999
		 * [0,6)
		 * 0-5.999
		 * 1--6.999
		 * Math.random()
		 */
		
		
	}
	
}
